package com.sky.service;

import com.sky.dto.DishDTO;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.result.PageResult;
import com.sky.vo.DishVO;

import java.util.List;

public interface DishService {
    /**
     * 分页查询
     * @param dishPageQueryDTO
     * @return
     */
    PageResult page(DishPageQueryDTO dishPageQueryDTO);

    /**
     * insert with flavor
     * @param dishDTO
     */
    void addWithFlavor(DishDTO dishDTO);

    /**
     * get by id
     * @param id
     * @return
     */
    DishVO getById(Long id);

    /**
     * update dish
     * @param dishDTO
     */
    void updateWithFlavor(DishDTO dishDTO);

    /**
     * select by categoryId
     * @param categoryId
     * @return
     */
    List<Dish> getByType(Long categoryId);

    /**
     * 菜品启售、停售
     * @param status
     * @param id
     * @return
     */
    void updateStatus(Integer status, Long id);

    void delete(Long[] ids);

    List<DishVO> getByCategoryId(Long categoryId);
}
